package com.jiawa.train.business.enums;

public enum CacheResultEnum {
    CACHE_OK(0, "缓存成功"),
    NEED_DB_CHECK_MORE(1, "缓存扣减成功，但触发刷新，需要查数据库"),
    NEED_DB_CHECK_ONE(2, "缓存中没有令牌记录，需要查询数据库并扣减一次"),
    NEED_DB_CHECK_LAST(3, "缓存扣减成功，但最后一次需更新数据库"),
    YDZ_CACHE_NOT_ENOUGH(4, "一等座缓存不足"),

    EDZ_CACHE_NOT_ENOUGH(5, "二等座缓存不足"),
    ERROR_NOT_FOUND(6, "缓存记录不存在" );

    private final int code;
    private final String desc;

    CacheResultEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }
    public String getDesc() {
        return desc;
    }

}
